package Cafezam;

import java.util.Scanner;

public class J03Tax {
	//세금 계산프로그램
	//조건1:미혼 - 연봉이 3000 미만:5%
   //								   3000 이상:10%
   //조건2:기혼 - 연봉이 5000  미만:15%
//	                   연봉이 5000이상:30%
//입력값:결혼여부,연봉
//결과값:세금율에 따른 세금
	public static void main(String[] args){
		
	    int tax;
		double taxpersent=0;
		int buy;
		int marry;
		double result;
		String title1="결혼하였습니까? 1.네 2,아니오";
		String title2="연봉을 입력하세요";
		
		Scanner sc = new Scanner(System.in);
		
		
		System.out.println(title1);
		marry=sc.nextInt();
		System.out.println(marry);
		System.out.println(title2);
		buy=sc.nextInt();
		
		if(marry==1)
		{
			if(buy<5000)
			{
				taxpersent=0.15;
			}
			else if(buy>=5000)
			{
				taxpersent=0.3;
		     }
		}
		else if(marry==2)
		{
			if(buy<3000)
			{
				taxpersent=0.05;
		    }
			else if(buy>=3000)
			{
				taxpersent=0.1;
			}
		}
		sc.close();
		tax=(int)(buy * taxpersent);
		System.out.println("세금은"+tax);

	}
	}

		
	
		
	
	
	
	

	

